<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>YAMB</title>
	
	<link href="/img/favicon.ico" type="image/x-icon" rel="icon" />
	<link href="/img/favicon.ico" type="image/x-icon" rel="shortcut icon" />
	
	<link rel="stylesheet" type="text/css" href="<?php echo  ROOT ?>/css/style.css" media="screen,print" />
	<link rel="stylesheet" type="text/css" href="<?php echo  ROOT ?>/css/ui-lightness/jquery-ui.css" media="screen" />
	
	<!-- JavaScript Includes -->
	<script type="text/javascript" language="javascript" src="<?php echo  ROOT ?>/js/jquery-1.4.1.min.js"></script>
	<script type="text/javascript" language="javascript" src="<?php echo  ROOT ?>/js/jquery-ui-1.7.2.custom.min.js"></script>
	<script type="text/javascript" language="javascript" src="<?php echo  ROOT ?>/js/jquery-totalposition-1.0.0.js"></script>
	
	<script type="text/javascript">
		var root = '<?php echo  ROOT ?>';
	</script>
	<script type="text/javascript" language="javascript" src="<?php echo  ROOT ?>/js/yamb/yamb.js"></script>
	
	<script type="text/javascript">
		function Go(sex) {
			$("#select-sex").remove();
			YambCookieSet("sex", sex);
			var Y = new Yamb({
				element: $("#play-yamb"),
				multiplayer: false,
				language: "sr",
				games: ["down", "free", "up", "call", "recall", "hand", "updown", "middleout"],
				sex: sex
			});
		}
		$(document).ready(function(){
			var sex = YambCookieGet("sex");
			if(sex) {
				Go(sex);
			}else{
				centerSexSelector();
			}
		});
		$(window).resize(centerSexSelector);
		function centerSexSelector(){
			var height = $(window).height();
			var ss = $("#select-sex");
			ss.css({
				marginTop: (height-ss.height())/2
			});
			ss.fadeIn();
		}
	</script>
</head>
<body>
	<div id="play-yamb"></div>
	<div id="select-sex">
		<h1><img src="/img/yamb.png" alt="Yamb" align="absmiddle" /> Yamb</h1>
		<a href="javascript:void(0)" onclick="Go('male');">Muškarci</a> | 
		<a href="javascript:void(0)" onclick="Go('female');">Žene</a>
	</div>
</body>
</html>